using Wolfpack.Core;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;

namespace Wolfpack.Contrib.BuildAnalytics.Tfs.Parsers
{
    public class MSTestCoverageReportParserConfigurationDiscovery : PluginDiscoveryBase<MSTestCoverageReportParserConfig, MSTestCoverageReportParser>
    {
        protected override MSTestCoverageReportParserConfig GetConfiguration()
        {
            return new MSTestCoverageReportParserConfig
                       {
                           Enabled = true,
                           FriendlyId = "CHANGEME!",
                           MatchBuildResult = true, 
                           TargetHealthCheckName = "The FriendlyId of the check that triggers this parser",
                           ReportFileTemplate = "N/A",
                           ZipFileTemplate = "N/A"
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "TFSBuildMSTestCoverageParser";
            entry.Description = "When triggered (usually by a successful Build Notification check) this plugin will" +
                                "parse the MSTest Coverage stats for that build and create a notification containing the overall coverage";
            entry.Tags.AddIfMissing(SpecialTags.PUBLISHER, "BuildAnalytics", "NCover");
        }

    }
}